<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/template.xhtml">

	<ui:define name="content">
		<h:form>
			<div class="middle">
				<h:messages class="myError" id="errors" />
				<h3><h:outputText value="#{msg.OM_responseRequest_replyRequest}"/></h3>
				<h:outputText value="&lt;br/&gt;" escape="false" />
			</div>

			<h:panelGrid class="panelGrid" columns="2" rendered="#{tb.var1}">
				<h:outputText value="#{msg.OM_request_user}"></h:outputText>
				<h:outputText value="#{tb.getUser(tb.resT.idUser).name}"></h:outputText>
				<h:outputText value="#{msg.OM_request_date}"></h:outputText>
				<h:outputText value="#{tb.resT.date}">
					<f:convertDateTime pattern="dd.MM.yyyy" />
				</h:outputText>
				<h:outputText value="#{msg.OM_request_request}"></h:outputText>
				<h:outputText value="#{tb.getResource(tb.resT.idResource).name}"></h:outputText>
				<h:outputText value="#{msg.BU_requestResources_quantity}"></h:outputText>
				<h:outputText value="#{tb.resT.quantity}"></h:outputText>
				<h:outputText value="#{msg.OM_responseRequest_measureunit}"></h:outputText>
				<h:outputText
					value="#{tb.getMeasureunit(tb.resT.itMeasureunit).name}"></h:outputText>
				<h:outputText value="#{msg.OM_responseRequest_description}"></h:outputText>
				<h:inputTextarea value="#{tb.resT.description}" cols="20" rows="5"
					style="resized: none" readonly="true"></h:inputTextarea>
				<h:outputText value="#{msg.OM_responseRequest_answer}"></h:outputText>
				<h:inputTextarea value="#{tb.response}" cols="20" rows="5"
					label="Please complete the reponse field" style="resized: none"
					required="true"></h:inputTextarea>
				<h:commandButton class="button" type="submit" value="#{msg.OM_responseRequest_send}"
					actionListener="#{tb.doResponse}">
					<f:attribute name="tickettype" value="request" />
				</h:commandButton>
			</h:panelGrid>

			<h:panelGrid class="panelGrid" columns="2" rendered="#{tb.var2}">
				<h:outputText value="#{msg.OM_responseRequest_user}"></h:outputText>
				<h:outputText value="#{tb.getUser(tb.techT.idUser).name}"></h:outputText>
				<h:outputText value="#{msg.OM_responseRequest_date}"></h:outputText>
				<h:outputText value="#{tb.techT.date}">
					<f:convertDateTime pattern="dd.MM.yyyy" />
				</h:outputText>
				<h:outputText value="#{msg.OM_responseRequest_resursa}"></h:outputText>
				<h:outputText value="#{tb.getUser(tb.techT.idUser).name}"></h:outputText>
				<h:outputText value="#{msg.OM_responseRequest_serialNo}"></h:outputText>
				<h:outputText
					value="#{tb.getTechresource(tb.techT.idTechresource).idnumber}"></h:outputText>
				<h:outputText value="IP"></h:outputText>
				<h:outputText
					value="#{tb.getTechresource(tb.techT.idTechresource).ip}"></h:outputText>
				<h:outputText value="#{msg.TG_ticketView_table_domain}"></h:outputText>
				<h:outputText
					value="#{tb.getDomain(tb.getTechresource(tb.techT.idTechresource).idDomain).name}"></h:outputText>
				<h:outputText value="#{msg.TG_ticketView_table_problemType}"></h:outputText>
				<h:outputText value="#{tb.techT.problemtype}"></h:outputText>
				<h:outputText value="#{msg.TG_ticketDetail_grid_description}"></h:outputText>
				<h:inputTextarea value="#{tb.techT.description}" cols="20" rows="5"
					style="resized: none" readonly="true"></h:inputTextarea>
				<h:outputText value="#{msg.OM_responseRequest_answer}"></h:outputText>
				<h:inputTextarea value="#{tb.response}" cols="20" rows="5"
					label="Please complete the reponse field" style="resized: none"
					required="true"></h:inputTextarea>
				<h:commandButton class="button" type="submit" value="#{msg.OM_responseRequest_send}"
					actionListener="#{tb.doResponse}">
					<f:attribute name="tickettype" value="tech" />
				</h:commandButton>
				<h:commandButton class="button" value="Cancel"
					style="align-left:20px; align-right:auto;" immediate="true"
					actionListener="#{managerPageBean.setPage('manageRequest')}"></h:commandButton>
			</h:panelGrid>
		</h:form>
	</ui:define>

</ui:composition>
</html>